﻿using BlazorHero.CleanArchitecture.Application.Specifications.Base;
using System;
using BlazorHero.CleanArchitecture.Domain.Entities.Members;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BlazorHero.CleanArchitecture.Application.Specifications.Members
{
    public class MemberFilterSpecification : HeroSpecification<Member>
    {
        public MemberFilterSpecification(string searchString)
        {
            if (!string.IsNullOrEmpty(searchString))
            {
                Criteria = p => p.PhoneNumber.Contains(searchString);
            }
            else
            {
                Criteria = p => true;
            }
        }
    }
}
